<template>
  <div>
    <TypeNav />
    <ListContainer />
    <Recommend />
    <Rank />
    <Like />
    <Floor v-for="(floor,index) in floorList" :key="floor.id" :floor="floor"/>
    <Brand />
  </div>  
</template>

<script>
// 引入组件
import ListContainer from '@/views/Home/ListContainer'
import Recommend from '@/views/Home/Recommend'
import Rank from '@/views/Home/Rank'
import Like from '@/views/Home/Like'
import Floor from '@/views/Home/Floor'
import Brand from '@/views/Home/Brand'
import {mapState} from 'vuex'
export default {
name:'Home',
components:{
  ListContainer,
  Recommend,
  Rank,
  Like,
  Floor,
  Brand
},
mounted(){
  // 派发floor数据
  this.$store.dispatch('getFloorList')
  // // 获取用户信息
  // this.$store.dispatch('user/getUserInfo')
},
computed:{
 ...mapState({
  // floor数据
  floorList: state => state.home.getFloorList,
 })
}
}
</script>

<style>

</style>